package edu.ybu.manage.service.impl;

import edu.ybu.manage.mapper.CangKuMapper;
import edu.ybu.manage.pojo.CangKu;
import edu.ybu.manage.service.CangKuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CangKuServiceImpl implements CangKuService {
    @Autowired
    private CangKuMapper cangKuMapper;
    @Override
    public List<CangKu> selectAll() {
        return cangKuMapper.selectList(null);
    }

    @Override
    public Integer deleteById(Integer id) {
        return cangKuMapper.deleteById(id);
    }

    @Override
    public Integer updateCangKu(CangKu cangKu) {
        return cangKuMapper.updateById(cangKu);
    }

    @Override
    public Integer insertCangKu(CangKu cangKu) {
        return cangKuMapper.insert(cangKu);
    }
}
